package br.com.naybee.service.tipoAutomacaofs;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import br.com.naybee.domain.tipoautomacao.TipoAutomacaoBs;
import br.com.naybee.framework.client.core.FrontServiceController;
import br.com.naybee.framework.client.models.ListModel;
import br.com.naybee.framework.client.models.Model;
import br.com.naybee.framework.client.models.Models;

@Controller
@RequestMapping("tipoAutomacaoFs")
public class TipoAutomacaoFs extends FrontServiceController {

	@Autowired
	private TipoAutomacaoBs tipoAutomacaoBs;

	@ResponseBody
	@RequestMapping(value = "listarTipoAutomacao", method = RequestMethod.POST)
	public ListModel listarTipoAutomacao() {
		return tipoAutomacaoBs.listarTipoAutomacao();
	}

	@ResponseBody
	@RequestMapping(value = "registrarTipoDeAutomacao", method = RequestMethod.POST)
	public Model registrarTipoDeAutomacao(@RequestBody Model param) {
		tipoAutomacaoBs.registrarTipoDeAutomacao(param);
		return Models.newModel();
	}

}
